package com.property.manage.dao.renovation;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.property.manage.model.flowingWater.TotalVo;
import com.property.manage.model.renovation.DepositEntity;
import com.property.manage.model.renovation.DepositVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/7/15
 */
@Repository
public interface DepositMapper extends BaseMapper<DepositEntity> {

    IPage<DepositVo> getPage(@Param("page") IPage<DepositVo> page, @Param("payer") String payer, @Param("villageId") Integer villageId, @Param("type") Integer type);
    IPage<DepositVo> getPage2(@Param("page") IPage<DepositVo> page, @Param("villageId") Integer villageId,@Param("building")Integer building,@Param("unit") Integer unit, @Param("roomNumber")String roomNumber, @Param("status") Integer status);

    BigDecimal getMoney(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("villageId") Integer villageId, @Param("type") Integer type);

    BigDecimal getMoneyDetailed(@Param("startTime") String startTime);

    BigDecimal getRefund(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("villageId") Integer villageId, @Param("type") Integer type);

    BigDecimal getRefundDetailed(@Param("startTime") String startTime);

    //押金收取时间
    List<String> selectTime(@Param("startTime") String startTime, @Param("endTime") String endTime);

    //押金退返时间
    List<String> selectRefundTime(@Param("startTime") String startTime, @Param("endTime") String endTime);

    List<Integer> selectBuildingId(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("villageId") Integer villageId);

    TotalVo getMoneyByBuildingId(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ids") List<Integer> ids);

    TotalVo getRefundByBuildingId(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ids") List<Integer> ids);
}
